package com.prj.ufdm.cloud.ms.core.enums.code;

/**
 * DESC: 学历编码（使用国标，标准号：GB/T 4658-2006）
 * @author 胡义振
 *
 */
public enum EducationEnum {
	
	EDUCATION_10("10","研究生"),
	EDUCATION_20("20","大学本科"),
	EDUCATION_30("30","大学专科"),
	EDUCATION_40("40","中专"),
	EDUCATION_60("60","高中"),
	EDUCATION_70("70","初中"),
	EDUCATION_80("80","小学"),
	EDUCATION_90("90","其他");
	
	private String code;
	private String message;
	
	EducationEnum(String code,String message){
		this.code = code;
		this.message = message;
	}

	/**
	 * DESC:根据值获取名称
	 * @param retCode
	 * @return
	 */
	public static String getRetMessage(String retCode){
		String rtnRetCode = "";
		for (EducationEnum codeGenerate : EducationEnum.values()) {
			if(codeGenerate.code.equals(retCode)){
				rtnRetCode = codeGenerate.message;
			}
	    }
		return rtnRetCode;
	}
	
	/**
	 * 
	 * DESC:根据名称获取值
	 * @param retMessage
	 * @return
	 */
	public static String getRetValue(String retMessage){
		String rtnRetCode = "";
		for (EducationEnum codeGenerate : EducationEnum.values()) {
			if(codeGenerate.message.equals(retMessage)){
				rtnRetCode = codeGenerate.code;
			}
	    }
		return rtnRetCode;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}
